# coding=utf-8
cache = [0]*20001
MOD = 1000000007
 
 
cache[0] = cache[1] = cache[2] = 1
 
 
n = int(input())
for i in range(3, n+1):
    cache[i] = (cache[i-1]+cache[i-3])%MOD
 
print(cache[n])